<template>
  <div>
    <el-card class="box-card" style="width:100%;height:15%">
      <el-form :inline="true" class="demo-form-inline">
        <el-form-item label="文章标题">
          <el-input placeholder="请输入关键字"></el-input>
        </el-form-item>
        <el-form-item>
          <el-button type="primary">查询</el-button>
        </el-form-item>
      </el-form>
    </el-card>
      <el-table
      :data="tableData"
      style="width: 100%">
      <el-table-column
        prop="title"
        label="文章标题"
        width="180">
      </el-table-column>
      <el-table-column
        prop="num"
        label="点赞数量"
        width="180">
      </el-table-column>
      <el-table-column
        prop="time"
        label="发表日期"
        width="180"
        >
      </el-table-column>
      <el-table-column label="是否推荐" width="200">
        <template slot-scope="scope">
          <div>
            <el-switch v-model="scope.row.switch1" active-text="推荐" inactive-text="不推荐">
        </el-switch>
          </div>
        </template>      
      </el-table-column>
    </el-table>

  </div>
</template>

<script>
 export default {
      data() {
        return {
          tableData: [
            {
            title: '308站神',
            num: '20M',
            time: '2021-7-30'
          }, 
            {
            title: '308站神',
            num: '20M',
            time: '2021-7-30'
          }, 
            {
            title: '308站神',
            num: '20M',
            time: '2021-7-30'
          }, 
            {
            title: '308站神',
            num: '20M',
            time: '2021-7-30'
          }, 
          ]
        }
      }
    }
</script>

<style>

</style>